<?php
/**
 * Created by PhpStorm.
 * User: deng
 * Date: 2016/4/20
 * Time: 14:27
 */
class RobotMsgModel {
    private $table = 'RS/';
    private $cache ;

    function __construct(){
        $this->cache = new RedisModel();
    }

    function getAll(){
        $result = $this->cache->getRobotMsgHash();
        if (empty($result)){
            $key = $this->table. 0;
            $where['status'] = 0;
            $orderBy = ' sort ASC ';
            $result = Storage::getConditionManyData($key, $where, $orderBy);
            $this->cache->addRobotMsgHash('list', $result);
        }

        return $result;
    }

}